Skip to content

Conversation

@ItsHarper
Copy link

@ItsHarper ItsHarper commented Jun 10, 2025

Fixes #209

docsgen/tsconfig.json, docs/examples/tsconfig.json and tests/tsconfig.json all reference tsconfig.base.json, which specified include and exclude arrays that were intended for the primary project. As a result, those projects were actually building the library's code instead of their own (if you delete dist/docsgen and then run yarn verify on the current main branch, it will fail because dist/docsgen contains the wrong thing).

This PR fixes this by extracting the include and exclude fields from tsconfig.base.json into a new tsconfig.src.base.json file that is only referenced by tsconfig.cjs.json and tsconfig.esm.json.

`tsconfig.base.json` includes settings that apply to ALL typescript in
the project (including tests and docsgen), while
`tsconfig.src.base.json` includes settings that should only apply to the
source code of the main library.

This fixes the `include` and `exclude` fields intended for library
compilation being applied to the `tests` and `docsgen` folders, which
made those folders actually just compile the library instead of their
actual code.
@ItsHarper ItsHarper changed the title Fix docsgen compilation Fix compilation of docsgen and type tests Jun 10, 2025
@ItsHarper ItsHarper marked this pull request as ready for review June 10, 2025 18:56
@ItsHarper ItsHarper changed the title Fix compilation of docsgen and type tests Fix compilation of docsgen, examples, and type tests Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The type tests in the test folder are not being compiled (and therefore tested)

1 participant